import axios from './axios'

export const getDataList = () => {
    return axios.request({
        url: '/menu/getDataList',
        method: 'get'
    })
}

// 根据角色ID查询菜单下拉树结构
export function roleMenuTreeselect(roleId) {
    return axios.request({
        url: '/menu/roleMenuTreeselect/' + roleId,
        method: 'get'
    })
}

export const addMenuTree = (data) => {
    return axios.request({
        url: '/menu/addMenuTree',
        method: 'post',
        data: data
    })
}

export const updataMenuTree = (data) => {
    return axios.request({
        url: '/menu/updateMenuTree',
        method: 'post',
        data: data
    })
}

export const deleteMenuTree = (id) => {
    return axios.request({
        url: '/menu/' + id,
        method: 'delete'
    })
}
